Tim was able to get scripts to work using the -m
flag with argument 0x20
. Somehow this specifies a local address, from https://linux.die.net/man/1/ipmitool:
-m <local_address>
Set the local IPMB address. The default is 0x20 and there should be no need to change it for normal operation.
This is very confusing because it should be 0x20 by default, without needing to specify with the -m flag, but here we are I guess.
Example where we set the IPs for the two FPGAs on the AMC13 module:
[root@dhcp-10-163-105-238 amc13Config]# ./readIPs.py --slot 13 Reading IP addresses of board in slot 13 from host 192.168.1.41 T2 IP Bytes: ipmitool -H 192.168.1.41 -U '' -P '' -m 0x20 -B 0 -T 0x82 -b 7 -t 0xa4 raw 0x32 0x34 0 11 0 4 ['c0', 'a8', '1a', '0a'] [192, 168, 26, 10] T1 IP Bytes: ipmitool -H 192.168.1.41 -U '' -P '' -m 0x20 -B 0 -T 0x82 -b 7 -t 0xa4 raw 0x32 0x34 1 11 0 4 ['c0', 'a8', '1a', '0b'] [192, 168, 26, 11]
[root@dhcp-10-163-105-238 amc13Config]# ./readIPs.py --slot 13
Reading IP addresses of board in slot 13 from host 192.168.1.41
T2 IP Bytes:
ipmitool -H 192.168.1.41 -U '' -P '' -m 0x20 -B 0 -T 0x82 -b 7 -t 0xa4 raw 0x32 0x34 0 11 0 4
['c0', 'a8', '1a', '0a']
[192, 168, 26, 10]
T1 IP Bytes:
ipmitool -H 192.168.1.41 -U '' -P '' -m 0x20 -B 0 -T 0x82 -b 7 -t 0xa4 raw 0x32 0x34 1 11 0 4
['c0', 'a8', '1a', '0b']
[192, 168, 26, 11]
And pinging afterwards:
[root@dhcp-10-163-105-238 amc13Config]# ping 192.168.26.10 PING 192.168.26.10 (192.168.26.10) 56(84) bytes of data. 64 bytes from 192.168.26.10: icmp_seq=1 ttl=64 time=0.190 ms 64 bytes from 192.168.26.10: icmp_seq=2 ttl=64 time=0.132 ms [root@dhcp-10-163-105-238 amc13Config]# ping 192.168.26.11 PING 192.168.26.11 (192.168.26.11) 56(84) bytes of data. 64 bytes from 192.168.26.11: icmp_seq=1 ttl=64 time=0.178 ms 64 bytes from 192.168.26.11: icmp_seq=2 ttl=64 time=0.089 ms
[root@dhcp-10-163-105-238 amc13Config]# ping 192.168.26.10
PING 192.168.26.10 (192.168.26.10) 56(84) bytes of data.
64 bytes from 192.168.26.10: icmp_seq=1 ttl=64 time=0.190 ms
64 bytes from 192.168.26.10: icmp_seq=2 ttl=64 time=0.132 ms
[root@dhcp-10-163-105-238 amc13Config]# ping 192.168.26.11
PING 192.168.26.11 (192.168.26.11) 56(84) bytes of data.
64 bytes from 192.168.26.11: icmp_seq=1 ttl=64 time=0.178 ms
64 bytes from 192.168.26.11: icmp_seq=2 ttl=64 time=0.089 ms
There's a makefile in here
[root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]# pwd /home/installation_testing/packages/experiment/lxedaq/amc13/amc13StandaloneMAN_2014-05-12 [root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]# ls amc13Config AMC13T2v0x0021_6slx25t.mcs lib map uhalEnv.csh amc13_mcs AMC13T2v0x0026_6slx25t.mcs log obj uhalEnv.sh amc13_scripts AMC13T2v0x0026_6slx45t.mcs Makefile README.txt uhalEnv.sh.backup AMC13T1v0x810b_7k325t.mcs bin Makefile.18May2014 save_Makefile AMC13T1v0x811f_7k325t.mcs include Makefile.before18May2014 src [root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]#
[root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]# pwd
/home/installation_testing/packages/experiment/lxedaq/amc13/amc13StandaloneMAN_2014-05-12
[root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]# ls
amc13Config AMC13T2v0x0021_6slx25t.mcs lib map uhalEnv.csh
amc13_mcs AMC13T2v0x0026_6slx25t.mcs log obj uhalEnv.sh
amc13_scripts AMC13T2v0x0026_6slx45t.mcs Makefile README.txt uhalEnv.sh.backup
AMC13T1v0x810b_7k325t.mcs bin Makefile.18May2014 save_Makefile
AMC13T1v0x811f_7k325t.mcs include Makefile.before18May2014 src
[root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]#
That creates a bin folder and builds one of the targets "AMC13Tool". I was able to get it to make by editting the makefile by changing some lines; I added BOOST_ROOT and PUGIXML_ROOT to the include path, as well as to the library path. I swapped out the external pugi root used in cactus for the normal pugi root flag -lpugixml
. These choices were made after debugging, I'm sure some other environment could be setup to make it work as "standard".
... INCLUDE_PATH = \ -Iinclude \ -I${CACTUS_ROOT}/include \ -I${ROOTSYS}/usr/include \ -I${BOOST_ROOT}/include \ -I${PUGIXML_ROOT}/include LIBNAME = uhalamc13 LIBRARY = lib/lib${LIBNAME}.so LIBRARY_SOURCES = $(wildcard src/common/*.cc) LIBRARY_OBJECT_FILES = $(patsubst src/common/%.cc,obj/%.o,${LIBRARY_SOURCES}) EXECUTABLE_SOURCES = $(wildcard src/common/*.cxx) EXECUTABLE_OBJECT_FILES = $(patsubst src/common/%.cxx,obj/%.o,${EXECUTABLE_SOURCES}) EXECUTABLES = $(patsubst src/common/%.cxx,bin/%,${EXECUTABLE_SOURCES}) LIBRARY_PATH = \ -L${CACTUS_ROOT}/lib \ -L${AMC13_ROOT}/lib \ -L/lib64 \ -L${ROOTSYS}/usr/lib64 \ -L${ROOTSYS}/lib64 \ -L${BOOST_ROOT}/lib \ -I${PUGIXML_ROOT}/lib64 LIBRARIES = \ -lpthread \ \ -lboost_filesystem \ -lboost_regex \ -lboost_system \ -lboost_thread \ \ -lpugixml \ -lcactus_uhal_log \ -lcactus_uhal_grammars \ -lcactus_uhal_uhal #-lcactus_extern_pugixml ...
...
INCLUDE_PATH = \
-Iinclude \
-I${CACTUS_ROOT}/include \
-I${ROOTSYS}/usr/include \
-I${BOOST_ROOT}/include \
-I${PUGIXML_ROOT}/include
LIBNAME = uhalamc13
LIBRARY = lib/lib${LIBNAME}.so
LIBRARY_SOURCES = $(wildcard src/common/*.cc)
LIBRARY_OBJECT_FILES = $(patsubst src/common/%.cc,obj/%.o,${LIBRARY_SOURCES})
EXECUTABLE_SOURCES = $(wildcard src/common/*.cxx)
EXECUTABLE_OBJECT_FILES = $(patsubst src/common/%.cxx,obj/%.o,${EXECUTABLE_SOURCES})
EXECUTABLES = $(patsubst src/common/%.cxx,bin/%,${EXECUTABLE_SOURCES})
LIBRARY_PATH = \
-L${CACTUS_ROOT}/lib \
-L${AMC13_ROOT}/lib \
-L/lib64 \
-L${ROOTSYS}/usr/lib64 \
-L${ROOTSYS}/lib64 \
-L${BOOST_ROOT}/lib \
-I${PUGIXML_ROOT}/lib64
LIBRARIES = \
-lpthread \
\
-lboost_filesystem \
-lboost_regex \
-lboost_system \
-lboost_thread \
\
-lpugixml \
-lcactus_uhal_log \
-lcactus_uhal_grammars \
-lcactus_uhal_uhal
#-lcactus_extern_pugixml
...
This requires defining some environment variables:
Apply the environment variables for BOOST_ROOT and PUGIXML_ROOT to the shell session:
cd /home/installation_testing/packages/experiment/gm2daq/environment_setup source setup_environment.sh
cd /home/installation_testing/packages/experiment/gm2daq/environment_setup
source setup_environment.sh
Add the built library to the shell session's library path:
export LD_LIBRARY_PATH=/home/installation_testing/packages/experiment/lxedaq/amc13/amc13StandaloneMAN_2014-05-12/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/installation_testing/packages/experiment/lxedaq/amc13/amc13StandaloneMAN_2014-05-12/lib:$LD_LIBRARY_PATH
I get this error:
[root@dhcp-10-163-105-238 bin]# ./AMC13Tool terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct null not valid Aborted (core dumped) [root@dhcp-10-163-105-238 bin]# ./AMC13Tool -u terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct null not valid Aborted (core dumped) [root@dhcp-10-163-105-238 bin]#
[root@dhcp-10-163-105-238 bin]# ./AMC13Tool
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Aborted (core dumped)
[root@dhcp-10-163-105-238 bin]# ./AMC13Tool -u
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Aborted (core dumped)
[root@dhcp-10-163-105-238 bin]#
But Tim does not:
[root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]# bin/AMC13Tool -u Connecting to AMC13... T2 ip 192.168.1.188 T2 ip 192.168.1.188 T1 ip 192.168.1.189 T1 192.168.1.189 map/AMC13_AddressTable_K7.xml 1 0 Failed to build T1 ipDev object!
[root@dhcp-10-163-105-238 amc13StandaloneMAN_2014-05-12]# bin/AMC13Tool -u
Connecting to AMC13...
T2 ip 192.168.1.188
T2 ip 192.168.1.188
T1 ip 192.168.1.189
T1 192.168.1.189 map/AMC13_AddressTable_K7.xml 1 0
Failed to build T1 ipDev object!
It might have something to do with where the script is called, i.e. calling it a directory back might read some file or something dumb like that.
Tim was able to set the WFD5 IPs (I'm sure he had to make slight edits to the script, particularly to include the -m 0x20
flag)
[root@dhcp-10-163-105-238 software]# python store_ip.py 1 5 192.168.1.42 ipmitool -I lan -H 192.168.1.41 -U '' -P '' -m 0x20 -B 0x0 -T 0x82 -b 7 -t 0x7a raw 0x32 0x51 0x2a 0x01 0xa8 0xc0
[root@dhcp-10-163-105-238 software]# python store_ip.py 1 5 192.168.1.42
ipmitool -I lan -H 192.168.1.41 -U '' -P '' -m 0x20 -B 0x0 -T 0x82 -b 7 -t 0x7a raw 0x32 0x51 0x2a 0x01 0xa8 0xc0
pull/push hotswap button on the WFD5
[root@dhcp-10-163-105-238 /]# ping 192.168.1.42 PING 192.168.1.42 (192.168.1.42) 56(84) bytes of data. 64 bytes from 192.168.1.42: icmp_seq=1 ttl=64 time=0.264 ms 64 bytes from 192.168.1.42: icmp_seq=2 ttl=64 time=0.126 ms
[root@dhcp-10-163-105-238 /]# ping 192.168.1.42
PING 192.168.1.42 (192.168.1.42) 56(84) bytes of data.
64 bytes from 192.168.1.42: icmp_seq=1 ttl=64 time=0.264 ms
64 bytes from 192.168.1.42: icmp_seq=2 ttl=64 time=0.126 ms
I was able to set the FC7 IPs.
First, I cloned this repository from the PIONEER github:
https://github.com/PIONEER-Experiment/unifiedCCC
On the 'be' computer under
/home/installation_testing/packages/unifiedCCC
/home/installation_testing/packages/unifiedCCC
I editted the script
unifiedCCC/software/store_ip.py
unifiedCCC/software/store_ip.py
to use the 192.168.1.41
host (instead of the 192.168.1.15
host) and added the -m 0x20
flag. I think I was able to assign an IP and ping the FC7:
[root@dhcp-10-163-105-238 software]# python3 store_ip.py 1 11 192.168.1.11 ipmitool -I lan -H 192.168.1.41 -U shelf -P shelf -m 0x20 -B 0x0 -T 0x82 -b 7 -t 0x86 raw 0x30 0x03 0xc0 0xa8 0x01 0x0b ipmitool -I lan -H 192.168.1.41 -U shelf -P shelf -m 0x20 -B 0x0 -T 0x82 -b 7 -t 0x86 raw 0x30 0x01 0xFE 0xEF [root@dhcp-10-163-105-238 software]# ping 192.168.1.11 PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data. 64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.174 ms 64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.123 ms 64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.138 ms ^C --- 192.168.1.11 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.123/0.145/0.174/0.021 ms [root@dhcp-10-163-105-238 software]#
[root@dhcp-10-163-105-238 software]# python3 store_ip.py 1 11 192.168.1.11
ipmitool -I lan -H 192.168.1.41 -U shelf -P shelf -m 0x20 -B 0x0 -T 0x82 -b 7 -t 0x86 raw 0x30 0x03 0xc0 0xa8 0x01 0x0b
ipmitool -I lan -H 192.168.1.41 -U shelf -P shelf -m 0x20 -B 0x0 -T 0x82 -b 7 -t 0x86 raw 0x30 0x01 0xFE 0xEF
[root@dhcp-10-163-105-238 software]# ping 192.168.1.11
PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data.
64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.174 ms
64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.123 ms
64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.138 ms
^C
--- 192.168.1.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.123/0.145/0.174/0.021 ms
[root@dhcp-10-163-105-238 software]#